<?php 
get_header(); 

// To Show Banner and Title
get_template_part( 'inc/title-bar' ); 
?>

        
		<!-- BEGINNING CONTENT -->
		<div id="content">
		        
		        <!--  BREADCRUMB -->
		        <?php 
				// Include Breadcrumb Bar
				get_template_part( 'inc/breadcrumb-sharebar' ); 
				?>
		        
		         
		        <!-- BEGINNING POSTWRAPPER -->
		        <div>
		  				<div class="post-data">
								<?php 
								$post = $posts[0]; 
																		
								if (is_category()) 
								{ 
									?>
									<h1  class="page-title"><?php printf(__('All posts in %s', 'locality'), single_cat_title('',false)); ?></h1>
									<?php 
								} 
								elseif( is_tag() ) 
								{ 
									?>
									<h1  class="page-title"><?php printf(__('All posts tagged %s', 'locality'), single_tag_title('',false)); ?></h1>
									<?php 
								} 
								elseif (is_day()) 
								{ 
									?>
									<h1 class="page-title"><?php _e('Archive for', 'locality') ?> <?php printf( __( '%s', 'locality' ), get_the_date() ); ?></h1>
									<?php 
								} 
								elseif (is_month()) 
								{ 
									?>
									<h1  class="page-title"><?php _e('Archive for', 'locality') ?> <?php printf( __( '%s', 'locality' ), get_the_date('F Y') );  ?></h1>
									<?php
								} 
								elseif (is_year()) 
								{ 
									?>
									<h1  class="page-title"><?php _e('Archive for', 'locality') ?> <?php printf( __( '%s', 'locality' ), get_the_date('Y') ); ?></h1>
									<?php 
								} 
								elseif (is_author()) 
								{
									$curauth = $wp_query->get_queried_object();
									?>
									<h1  class="page-title"><?php _e('All posts by', 'locality') ?> <?php echo $curauth->display_name; ?></h1>
									<?php
								} 
								elseif (isset($_GET['paged']) && !empty($_GET['paged'])) 
								{ 
									?>
									<h1  class="page-title"><?php _e('Blog Archives', 'locality') ?></h1>
									<?php 
								} 
								?>
		                </div><!-- CLOSING OF POSTDATA -->
		                
		        </div><!-- CLOSING OF POST WRAPPER -->
		        
				<!-- NEWS POST -->
		        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
				
			        <div <?php post_class('post-wrapper'); ?>>
					
			                <div class="blog-head">      
			                        <?php 
									if ( has_post_thumbnail() ) 
									{								
										?>
										<a href="<?php the_permalink(); ?>">
											<?php the_post_thumbnail('blog-post-thumb');?>
										</a>
										<?php
									}
			                        ?>
			
			                        <h2 class="post-title">
										<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
											<?php the_title(); ?>
										</a>
									</h2> 
			                        
			                        <div class="post-meta">
			                                <span class="date"><?php the_time('F j, Y'); ?></span>                                
			                                <span class="author"><?php the_author_posts_link(); ?></span>                                
			                                <span class="comments-count"><?php comments_popup_link( __('0 Comments','locality'), __('1 Comment','locality'), __('% Comments','locality') ); ?></span>                                
			                                <span class="categ"><?php the_category(', ') ?></span>                                
			                                <span class="tags"><?php the_tags( '', ', ', '' ); ?></span>
			                        </div>	
			                </div>
			                
			                <div class="post-data">
									<?php the_content(''); ?>
			                        <a class="readpost-btn" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
										<?php _e('Read more','locality'); ?>
									</a>
			                </div>
							
			        </div><!-- POST WRAPPER CLOSED-->
				
		        	<hr />        
		       
		       <?php endwhile; else : ?>
			   
					<div <?php post_class('post-wrapper'); ?>>
						<div class="post-data">
							<p><?php _e('No Posts Available !.','locality'); ?></p>
						</div>
					</div>
					
				<?php endif; ?>        
		        
		        <!-- POSTS PAGINATION-->
		        <?php theme_pagination( $wp_query->max_num_pages); ?>
		        
		</div><!-- CLOSING CONTENT -->
		
		<!-- SIDEBAR blog -->
		<?php get_sidebar('blog'); ?>

<!-- FOOTER -->
<?php get_footer(); ?>